home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb.new / gdb-4.0 / bfd / doc / scanit < prev    next >
Encoding:
Text File  |  1991-08-24  |  851 b   |  26 lines

  1. #!/bin/sh
  2. # Script to coordinate parsing of S. Chamberlain source-embedded 
  3. # documentation markup language.
  4.  
  5. # Four passes:
  6. #    1) awk discards lines not intended for docn, and marks blocks of
  7. #       text with comments identifying source file;
  8. #    2) first sed pass interprets Chamberlain markup;
  9. #    3) second sed pass does cleanup that involves merging lines
  10. #    4) third sed pass does remaining cleans up---making {}
  11. #       printable within examples, and eliminating empty index entries and
  12. #          headings.
  13. #Third and second sed passes are separate because order of execution is hard
  14. #to control otherwise, making one or another of the things involving @example
  15. #inoperative.
  16.  
  17. base=`echo $1 | cut -d '.' -f 1`
  18. out=`echo $2 | cut -d '.' -f 1`
  19.  
  20. awk -f awkscan $1 | \
  21. sed -f sedscript | \
  22. sed -f unPROTO | \
  23. sed -f exmerge  | \
  24. sed -f exfilter  >$out.texi
  25.  
  26.